/*
 * @description: 校验规则
 * @Author: Islands
 * @Date: 2024-03-24 18:18:07
 * @LastEditTime: 2024-03-24 18:29:59
 */



/**
 * 非中文校验
 * @param rule 
 * @param value 
 * @param callback 
 */
export const noChinese = (rule: any, value: string, callback: any) => {
    if (value) {
        if (/[\u4E00-\u9FA5]/g.test(value)) {
            callback(new Error('不能包含中文'))
        } else {
            callback()
        }
    }
    callback()
}